package com.ljw.zookeeper;

import java.util.List;
import java.util.Random;

/**
 * @Author: lijunwei
 * @Time: 2019/8/10 20:58
 */
public class RandomLoadBalance extends AbstractLoadBalance {

    @Override
    protected String doSelect(List<String> serviceRepos) {
        int length = serviceRepos.size();
        Random random = new Random();
        return serviceRepos.get(random.nextInt(length));
    }
}
